package com.ChenYaRou.www.dao;

import com.ChenYaRou.www.po.Notice;

import java.sql.SQLException;
import java.util.List;

/**
 * @author 86183
 */
public interface NoticeDao {
    /**
     * 查找系统通知集合
     * @param notice 仅赋值条件的系统通知
     * @return 系统通知集合
     * @throws IllegalAccessException
     * @throws SQLException
     * @throws NoSuchFieldException
     * @throws InstantiationException
     */
    List<Notice> select(Notice notice) throws IllegalAccessException,
            SQLException, NoSuchFieldException, InstantiationException;

    /**
     * update notice
     * @param newNotice notice要更新的值
     * @param  oldNotice old notice
     * @return 成功与否
     * @throws IllegalAccessException
     * @throws SQLException
     */
    int update(Notice newNotice,Notice oldNotice) throws IllegalAccessException, SQLException;
    /**
     * 插入notice
     * @param notice 新notice
     * @return 更新条数
     * @throws IllegalAccessException
     * @throws SQLException
     */
    int insert(Notice notice) throws IllegalAccessException, SQLException;


}
